package org.databasefacade;


import java.sql.Connection;

import org.databasefacade.exception.DatabaseFacadeException;
import org.databasefacade.translator.Translator;


public class DatabaseHelper implements DatabaseFacadeConst
{
	private DatabaseConnectionManager dbConnManager = new DatabaseConnectionManager();
	private Translator dbTranslator = null;
	private int databaseType = ANSI_SQL_92;
	private ConnectionProperties connectionProps;
	
	public Connection getConnection()
		throws DatabaseFacadeException
	{
		return dbConnManager.getConnection();
	}

	public void setConnectionManager(DatabaseConnectionManager dbConnManager)
	{
		this.dbConnManager = dbConnManager;
	}
	
	public DatabaseConnectionManager getConnectionManager()
	{
		return this.dbConnManager;
	}
	
	public void setTranslator(Translator dbTranslator)
	{
		this.dbTranslator = dbTranslator;
	}
	
	public Translator getTranslator()
	{
		return this.dbTranslator;
	}
	
	public void setDatabaseType(short t)
	{
		databaseType = t;
	}
	
	public int getDatabaseType()
	{
		return databaseType;
	}
	
	public void setConnectionProps(ConnectionProperties connectionProps)
	{
		this.connectionProps = connectionProps;
	}
	
	public ConnectionProperties getConnectionProps()
	{
		return connectionProps;
	}
	
}
